import oracle = require("oracledb");
import dbConfig = require("../config/dbConfig");

let config = dbConfig.config;

oracle.getConnection(config,function(err,connection){
    if(err){
        console.error(err.message);
        return;
    }

    connection.execute(
        "insert into TNMS.T_USER(ID,CODE,NAME)values(:ID,:CODE,:NAME)",
        ["nodejs","nodejs","nodejs测试"],
        function(err,result){
            if (err) {
                console.error(err.message);
                return;
            }
            // 提交更改
            connection.commit();
        });
});